<?php
/**
 * User: b179a9
 * Date: 10/12/11
 * Time: 7:42 PM
 */

class App_Form_User_Invite extends Zend_Form
{

    public function init()
    {
        $this->setAction('/user/invite');
        $this->setMethod('post');

        $email = new Zend_Form_Element_Text('email');
        $email->setRequired()
                ->setLabel("Friend's email:")
                ->addValidator(new Zend_Validate_EmailAddress())
                ->addValidator(new Lib_Form_Validate_DbHasNotRecord('\Catalog\Users', 'email'));
        $this->addElement($email);

        $submit = new Zend_Form_Element_Submit('submit');
        $submit->setLabel('Send');
        $this->addElement($submit);
    }

}
